//
//  NewZhiWenYanzhengViewController.m
//  wangzhe
//
//  Created by 李 佳伟 on 2018/3/31.
//  Copyright © 2018年 李 佳伟. All rights reserved.
//

#import "NewZhiWenYanzhengViewController.h"
#import "JTCSM.h"
@interface NewZhiWenYanzhengViewController ()

@end

@implementation NewZhiWenYanzhengViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationController.navigationBar.hidden = YES;
    self.view.backgroundColor = [UIColor whiteColor];
    CGFloat logoimagesize = 80;
    UIImageView *logoImageV = [[UIImageView alloc]initWithFrame:CGRectMake((KCONTROLLERWith-logoimagesize)/2, 80, logoimagesize, logoimagesize)];
    logoImageV.image = self.logoimage==nil?[UIImage imageNamed:@"手势登录_头像.png"]:self.logoimage;
    [self.view addSubview:logoImageV];
    
    
    UIImageView *zhiwenImageV = [[UIImageView alloc]initWithFrame:CGRectMake((KCONTROLLERWith-logoimagesize)/2, KVIEW_Y(logoImageV)+120, logoimagesize, logoimagesize)];
    zhiwenImageV.image = [UIImage imageNamed:@"指纹.png"];
    [self.view addSubview:zhiwenImageV];
    zhiwenImageV.userInteractionEnabled = YES;
    [df addTapGestureRecognizerWithTarget:self action:@selector(gotoYanzheng) andaddView:zhiwenImageV];
    
    UILabel *label = [UILabel initWithFrame:CGRectMake(0, KVIEW_Y(zhiwenImageV)+20, KCONTROLLERWith, 20) text:@"点击指纹进行解锁" font:14 textAlignment:NSTextAlignmentCenter texcolor:[UIColor blackColor] backgroundColor:nil];
    [self.view addSubview:label];
    
    // Do any additional setup after loading the view.
}

- (void)gotoYanzheng{
    [YWFingerprintVerification fingerprintVerificationCallBack:^(NSError *error) {
        if(!error){
            NSLog(@"指纹验证通过");
            [self.delegate getIsTongguoWithType:yanzhengtypeSuccess];
        }else{
            
            NSLog(@"指纹验证失败->%@", @(error.code));
           
            
        }
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
